<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
		<script type="text/javascript">
			$(function() {
				$("tr:even").css("background-color", "#E0F9BA");
				$("tr:odd").css("background-color", "#fff");
			});
		</script>
	</head>

	<body>
		<h3>
			当前位置 >> 查看日志
		</h3>
		<table cellpadding="0" cellspacing="0" border="0" width="100%"
			class="table">
			<tr class="table_header">
				<td valign="middle" align="center">
					日志编号
				</td>
				<td valign="middle" align="center">
					操作人
				</td>
				<td valign="middle" align="center">
					操作时间
				</td>
				<td valign="middle" align="center">
					操作内容
				</td>
			</tr>
			<s:iterator value="list" var="user" status="st">
				<tr class="row${st.index%2+1}">
					<td valign="middle" align="center">
						<s:property value="#user.username" />
					</td>
					<td valign="middle" align="center">
						<s:property value="#user.name" />
					</td>
					<td valign="middle" align="center">
						<s:date name="#user.hiredate" format="yyyy年M月d日" />
					</td>
					<td valign="middle" align="center">
						<s:property value="#user.position" />
					</td>
				</tr>
			</s:iterator>
		</table>
		<p style="padding: 5px; width: 890px; margin-top: 5px; margin-right: 100px; border: 1px solid #eee; text-align: right; background: #ddd;">
			<s:if test="%{userPage.currentPage == 1}">
				&lt;&lt;&nbsp;首页&nbsp;|&nbsp;上一页
			</s:if>
			<s:else>
				<a href="<%=basePath%>/user/adminGetAllUsers?page=1">&lt;&lt;&nbsp;首页</a>
				<a href="<%=basePath%>/user/adminGetAllUsers?page=${userPage.currentPage-1}">&nbsp;|&nbsp;上一页&nbsp;</a>
			</s:else>

			<s:if test="%{userPage.currentPage == userPage.pageCount}">
				&nbsp;下一页 &nbsp;|&nbsp;末页 &gt;&gt;
			</s:if>
			<s:else>
				<a href="<%=basePath%>/user/adminGetAllUsers?page=${userPage.currentPage+1}">下一页&nbsp;|</a>
				<a href="<%=basePath%>/user/adminGetAllUsers?page=${userPage.pageCount}">&nbsp;末页&gt;&gt;</a>
			</s:else>
			<strong>第${userPage.currentPage}页 / 共${userPage.pageCount}页</strong>每页${userPage.pageSize }条记录 &nbsp;&nbsp;&nbsp;总共${userPage.rows }条记录
		</p>
	</body>
</html>
